package com.cskaoyan.service.wx;

import com.cskaoyan.bean.MarketUser;
import com.cskaoyan.bean.wx.WXRegisterUser;

public interface WXAuthService {
    /**
     * 根据前台传入的数据注册
     * * 705:手机号已注册
     * * 703:验证码错误
     * * 704:用户名已注册
     *
     * @param registerUser
     * @return java.lang.Integer
     * @author Bowen Deng
     * @since 2022/06/29 9:49 下午
     */
    Integer register(WXRegisterUser registerUser);

    MarketUser queryUserByName(String username);

    /**
     * 703:验证码错误
     *
     * @param code
     * @param mobile
     * @param password
     * @return java.lang.Integer
     * @author Bowen Deng
     * @since 2022/06/30 9:11 上午
     */
    Integer reset(String code, String mobile, String password);

    /**
     * 存储code
     *
     * @param phoneNumber
     * @param code
     * @return java.lang.Integer
     * @author Bowen Deng
     * @since 2022/06/30 9:37 上午
     */
    Integer insertCode(String phoneNumber, String code);

    /**
     * 判断status，不为0就禁止登陆
     *
     * @param username
     * @return java.lang.Integer
     * @author Bowen Deng
     * @since 2022/06/30 8:18 下午
     */
    Integer isAvailable(String username);
}
